package com.kaifamiao.sequence;

import java.util.Arrays;

public class CharSequenceTest {

	public static void main(String[] args) {
		
		char[] chars = { '春' , '眠' , '不' , '觉' , '晓' };
		System.out.println( Arrays.toString( chars ) );
		
		CharSequence cs = new CharacterStrings( chars );
		
		System.out.println( cs.length() );
		System.out.println( cs.charAt( 1 ) );
		System.out.println( cs ); // cs == null ? "null" : cs.toString()
		
		CharSequence x = cs.subSequence( 2 , 5 ) ;
		System.out.println( x );
		
		chars[ 0 ] = '冬' ;
		System.out.println( Arrays.toString( chars ) );
		
		System.out.println( cs ); // cs == null ? "null" : cs.toString()

	}

}
